<!--
*Author：COCO
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/warehouse/warehouse/Ware_SundriesOutMain.js此处编写
 -->
<template>
    <view-grid ref="grid"
               :columns="columns"
               :detail="detail"
               :editFormFields="editFormFields"
               :editFormOptions="editFormOptions"
               :searchFormFields="searchFormFields"
               :searchFormOptions="searchFormOptions"
               :table="table"
               :extend="extend">
    </view-grid>
</template>
<script>
    import extend from "@/extension/warehouse/warehouse/Ware_SundriesOutMain.js";
    import { ref, defineComponent } from "vue";
    export default defineComponent({
        setup() {
            const table = ref({
                key: 'SundriesOutMain_ID',
                footer: "Foots",
                cnName: '其他出库',
                name: 'warehouse/Ware_SundriesOutMain',
                url: "/Ware_SundriesOutMain/",
                sortName: "SundriesOutMain_ID"
            });
            const editFormFields = ref({"SundriesOutCode":"","SundriesOutMan":"","Remark":""});
            const editFormOptions = ref([[{"title":"出库编码","field":"SundriesOutCode","type":"text"}],
                              [{"title":"出库人","required":true,"field":"SundriesOutMan","type":"text"}],
                              [{"title":"备注","field":"Remark","type":"textarea"}]]);
            const searchFormFields = ref({"SundriesOutCode":"","SundriesOutMan":"","Bstate":""});
            const searchFormOptions = ref([[{"title":"出库编码","field":"SundriesOutCode","type":"text"},{"title":"出库人","field":"SundriesOutMan","type":"text"}],[{"dataKey":"inStoreState","data":[],"title":"状态","field":"Bstate","type":"radio"}]]);
            const columns = ref([{field:'SundriesOutMain_ID',title:'出库ID',type:'int',width:110,hidden:true,readonly:true,require:true,align:'left'},
                       {field:'SundriesOutCode',title:'出库编码',type:'string',width:220,align:'left',sort:true},
                       {field:'SundriesOutMan',title:'出库人',type:'string',width:220,require:true,align:'left'},
                       {field:'Bstate',title:'状态',type:'int',bind:{ key:'inStoreState',data:[]},width:110,align:'left'},
                       {field:'Remark',title:'备注',type:'string',width:220,align:'left'},
                       {field:'CreateDate',title:'创建时间',type:'datetime',width:110,align:'left',sort:true},
                       {field:'CreateID',title:'创建人编号',type:'int',width:80,hidden:true,align:'left'},
                       {field:'Creator',title:'创建人',type:'string',width:130,align:'left'},
                       {field:'Modifier',title:'修改人',type:'string',width:130,align:'left'},
                       {field:'ModifyDate',title:'修改时间',type:'datetime',width:110,align:'left',sort:true},
                       {field:'ModifyID',title:'修改人编号',type:'int',width:80,hidden:true,align:'left'}]);
            const detail = ref({
                cnName: "其他出库明细",
                table: "Ware_SundriesOutDetail",
                columns: [{field:'SundriesOutDetail_ID',title:'出库明细id',type:'int',width:110,hidden:true,readonly:true,require:true,align:'left'},
                       {field:'SundriesOutMain_ID',title:'出库ID',type:'int',width:110,hidden:true,require:true,align:'left'},
                       {field:'ProductCode',title:'产品编码',type:'string',width:220,require:true,align:'left',sort:true},
                       {field:'ProductName',title:'产品名称',type:'string',width:220,align:'left'},
                       {field:'Specification',title:'规格',type:'string',width:220,align:'left'},
                       {field:'Type',title:'类别',type:'string',width:180,hidden:true,align:'left'},
                       {field:'LotNo',title:'批次',type:'string',width:220,hidden:true,align:'left'},
                       {field:'Qnty',title:'数量',type:'decimal',width:110,edit:{type:''},require:true,align:'left'},
                       {field:'CreateDate',title:'新建时间',type:'datetime',width:110,hidden:true,align:'left',sort:true},
                       {field:'CreateID',title:'新建人ID',type:'int',width:80,hidden:true,align:'left'},
                       {field:'Creator',title:'新建人名称',type:'string',width:130,hidden:true,align:'left'},
                       {field:'Modifier',title:'修改人名称',type:'string',width:130,hidden:true,align:'left'},
                       {field:'ModifyDate',title:'修改时间',type:'datetime',width:110,hidden:true,align:'left',sort:true},
                       {field:'ModifyID',title:'修改人ID',type:'int',width:80,hidden:true,align:'left'}],
                sortName: "SundriesOutDetail_ID",
                key: "SundriesOutDetail_ID"
            });
            return {
                table,
                extend,
                editFormFields,
                editFormOptions,
                searchFormFields,
                searchFormOptions,
                columns,
                detail,
            };
        },
    });
</script>
